home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d3
/
pctyp2_c.arc
/
PCTDOC1.EXE
/
lha
/
CHAP13.TXT
< prev
next >
Wrap
Text File
|
1989-04-21
|
23KB
|
505 lines
subject: CREATING GRAPHS
overview: With PC-Type II you can create numerous graphs. These
graphs can be printed on Epson, IBM Pro Printer,
Okidata and LaserJet printers.
Graphs include pie charts, vertical and horizontal bar
charts, and line and scatter diagrams. You can have
up to 100 variables with 100 points apiece. You can
display cumulative graphs for bar charts and line
diagrams. Pie charts may be displayed singly, or two
at a time.
Within the graphics package, you can superimpose a
grid and display your data logarithmically. Slices of
pies may be selectively exploded. You can define the
aspect ratios of both your monitor and your printer
so that pies will appear round on both. You can also
select colors if you have an EGA or VGA color monitor.
PC-Type II prompts you for the information required for
your graph and creates a file called GRAPH.ME in your
default directory. It then switches to the program
PCG2.EXE which reads the GRAPH.ME file. Within
PCG2.EXE you may move from one representation of the
data to another, (e.g. from a line diagram to bar
chart), print the graphs, etc. When you are finished
and leave the PCG2 program, you are returned to
PC-Type II.
This section describes how to define the data for
PC-Type II to create the GRAPH.ME file. The sample shown
below will be used to describe this process. To learn
how to operate PCG2.EXE, refer to PCG2 in the "Other
Programs" section of this manual.
┌───────────────────────────────────────┐
│ │
│ Comparative Intnl Sales │
│ (By city & Month) │
│ │
│ (86) │
│ Jan Feb Mar │
│ ┌──────────────── │ │
│ Philly│ 10 50 22 │ 82 │
│ Montreal│ 20 80 -10 │ 90 │
│ Paris│ 30 20 40 │ 90 │
│ Moscow│ 40 15 60 │ 115 │
│ Redmond│100 30 15 │ 145 │
│ Lima│ 60 110 99 │ 269 │
│ Bonn│ 20 33 122 │ 175 │
│ ─────────────────┼──── │
│ Totals 280 338 348 │ 966 │
│ │
└───────────────────────────────────────┘
158
subject: GRAPH MODE
discussion: To enter the GRAPH Definition Mode, select the option
"(G)raph" from the Main Menu. When you do so, the
following window will appear:
╔══════════════════════════════════╗
║ In GRAPH mode. ║
║ ║
║ Only screen movement keys active.║
║ Requests for information will be ║
║ made on the command line. ║
║ Press a key to continue. ║
╚══════════════════════════════════╝
Once in this mode, you cannot alter your file.
The entire purpose of this mode is to define where the
data to be graphed is located within your file. The
cursor movement keys will operate, such as PgUp, PgDn,
and the arrow keys. The highlighting keystrokes are
also operable.
You may exit the GRAPH Definition Mode by pressing the
Esc key at any time. If you do so, you will be asked
to confirm exiting the mode by answering Yes or No
before you will be returned to PC-Type II's normal edit
mode.
graph.me: The data to be graphed will be saved in an ASCII file
called GRAPH.ME on your default drive. The data in
GRAPH.ME is used by PCG2.EXE to create the graph(s).
GRAPH.ME can be edited directly by PC-Type II and rerun
without having to redefine the graphics data via the
GRAPH Definition Mode of PC-Type II.
After pressing a key to exit the window shown above,
PC-Type II checks to see if GRAPH.ME already exists on
your default drive. If such a file does exist, then
the window below will be shown:
┌──────────────────────────────────┐
│ Question: │
╞══════════════════════════════════╡
│ │
│ Create new GRAPH.ME file or │
│ go directly to PCG2? │
│ Press C for Create or P for PCG2 │
└──────────────────────────────────┘
By pressing P, the GRAPH.ME file will be rerun by
PCG2.EXE with no further ado. If you wish to define
new data, however, then press C and a new GRAPH.ME
file will be created by answering the questions which
follow. (If no GRAPH.ME file exists on your default
drive, this question will not be asked.)
159
subject: DEFINING VALUES TO BE GRAPHED
discussion: The first information requested is the location of the
values to be graphed with the message:
Mark DATA to be graphed with CtrlB. F10 when done.
This is accomplished by moving the cursor to opposite
corners of the set of data values to be graphed and
pressing Ctrl B at each of the two locations. In the
examples below, these locations are shown by the "╔"
and '╝' characters. (The examples are extracted from
the sample PC-Type II file shown at the bottom of the
Overview page of this section.)
╔───────────────┐
│ 10 50 22│ In this example, multiple groups of
│ 20 80 -10│ data (variables) are defined. Each
│ 30 20 40│ row constitutes a group of data
│ 40 15 60│ consisting of three points. In this
│100 30 15│ case, a group is a set of monthly
│ 60 110 99│ sales figures for a particular city.
│ 20 33 122│
└───────────────╝
╔───────────────┐ If only one group is to be graphed,
│ 40 15 60│ then you may mark a single row as
└───────────────╝ shown to the left, or a single
╔───┐ column as below. Many of the
│ 22│ following questions depend upon
│-10│ which type of value marking was
│ 40│ made. Once the values have been
│ 60│ defined by the Ctrl Bs, press F10 to
│ 15│ continue to the next step.
└───╝
To distinguish different columns of data, PC-Type II asks:
Define columns as: aabbbb cccc. Then press Enter.
┌───────────────┐ A field will appear within the area
│ 10 50 22│ you marked (shown at the left with
│ 20 80 -10│ the '║' characters.). Mark each
│ 30 20 40│ column with a set of repeating
│ 40 15 60│ characters. If a column is not to
│100 30 15│ be graphed, leave spaces in the
│ 60 110 99│ field. If only one column exists,
║aaabbbbbbcccccc║ fill it in. These column
└───────────────┘ definitions are also used for the
column identifiers.
The values defined are then given a meaning:
Enter content of data being graphed e.g. SALES in $:
In our example we entered "Sales in $".
160
subject: DEFINING COLUMN LABELS for the GRAPH
discussion: Column labels and the column category heading will be
truncated if they exceed 12 characters in length. If
you only define one column, the questions on this page
will not be asked.
After the data values are defined, you must identify
the labels which go with the columns you marked. You
are prompted for this data with the message:
Mark COL identifiers with CtrlB. Press F10 when done.
In our example, you would mark the three months by
pressing CtrlB at the ╔ and ╝ characters.
(Actually, you can move to the appropriate line and
press Ctrl L). The label data in the marked area will
be separated by the same column definition information
you provided above. For this reason, you should be
sure to define the columns wide enough to include the
column labels which are assumed to line up exactly.
╔───────────────┐
│Jan Feb Mar│
└───────────────╝
After marking the column labels, press F10 and respond
to the data request:
Enter COL category - e.g. Months:
In our example, we typed "Months".
Suppose for a moment that the column label data we
marked was not the months shown above, but the values:
╔───────────────┐
│1.0 2.0 3.4│
└───────────────╝
Then we would be asked:
┌─────────────────────────┐
│ Question: │
╞═════════════════════════╡
│ All Column IDs numeric. │
│ Use as Text or Value? │
│ Press T or V │
└─────────────────────────┘
If we pressed T, then the column labels would be
treated as text and separated by equal distances when
placed on the X-axis of a Line or Scatter diagram.
However, if we pressed V, then the column label values
would be treated as numeric values on the X-axis of a
Line or Scatter diagram, and their points would be
plotted according to the values defined. (For this
example we defined the category title as "Values".)
161
subject: DEFINING ROW LABELS for the GRAPH
discussion: If you only define one row, the questions on this page
will not be asked.
(Row labels and the row category heading will be
truncated if they exceed 12 characters in length.)
You must identify the labels which go with the rows
you marked. You are prompted for this data with the
message:
Mark ROW identifiers with CtrlB. Press F10 when done.
╔────────┐
│ Philly│
│Montreal│
│ Paris│
│ Moscow│
│ Redmond│
│ Lima│
│ Bonn│
└────────╝
In our example, we marked the row labels as shown by
pressing CtrlB at the ╔ and ╝ characters.
The row labels must be on the same row as the data
they represent. For this reason, PC-Type II only
needs to know the size and offset on the row where the
row labels are to be found. This could be done by
only marking "Montreal" as:
╔────────┐
│Montreal│
└────────╝
After marking the row labels, press F10 and then
respond to the data request:
Enter ROW category - e.g. Months:
In our example, we typed "Cities", then pressed the
Enter key.
Unlike column labels, row labels are always treated as
text.
162
subject: DEFINING TITLES
title: The graph's title may be up to 40 characters in
length. You may highlight the title with Ctrl B's or
type in the title separately by responding to the
prompt:
Highlight the graph TITLE then F10, or F10 first and type one in.
╔───────────────────────┐
│Comparative Intnl Sales│
└───────────────────────╝
In our example, we highlighted the title by pressing
CtrlB at the ╔ and ╝ characters. Then we pressed F10.
Alternatively, we could have pressed F10 without
highlighting any data. In this case a field would be
made available with the prompt "Enter graph title:".
You could then type in the desired title and press the
Enter key.
subtitle: The graph's subtitle may be up to 40 characters in
length. You may highlight the subtitle on the graph
with Ctrl Bs or type in the subtitle separately by
responding to the prompt:
Highlight the SUBTITLE then F10, or F10 first and type one in.
╔─────────────────┐
│(By city & Month)│
└─────────────────╝
In our example, we highlighted the subtitle by
pressing CtrlB at the ╔ and ╝ characters. Then we
pressed F10.
Alternatively, we could have pressed F10 without
highlighting any data. In this case a field would be
made available with the prompt "Enter subtitle:". You
could then type in the desired subtitle and press the
Enter key. (If no subtitle is desired, use this
option and press Enter without keying in any text.)
163
subject: INITIAL TYPE OF GRAPH AND SETTING BOUNDS
graph type: You are now ready to select the initial type of graph
to display when PCG2 is called. Select the graph type
from the menu shown below.
┌────────────────┐
│Graph Type: │
╞════════════════╡
│(H)orizontal Bar│
│(L)ine │
│(P)ie │
│(S)catter │
│(V)ertical Bar │
└────────────────┘
Once inside PCG2 you can, of course, switch from one
type of graph to another.
setting bounds: This option only occurs if multiple columns were
defined with numeric column labels. If the first
column label is a value greater than 0, you will be
asked:
┌────────────────────────────┐
│ Question: │
╞════════════════════════════╡
│ │
│ Min X value > 0. │
│ Graph from X=Zero or X=Min │
│ Press Z or M │
│ │
└────────────────────────────┘
A line or scatter diagram of such a graph will
normally start with the left-most point on the X-axis
equal to zero. Since the first value was greater than
0, the graph will not begin at the left of the
graphics screen.
This question permits you to begin the X-axis at the
minimum X value supplied as a column label if you
press M. A special "BOUND:" record is added to the
GRAPH.ME file in this case, and the MENU option
"(B)OUND" will appear in PCG2. Pressing B in the PCG2
menu will toggle you between the standard
representation and the "bound" representation.
164
subject: SAMPLE GRAPH.ME FILES
discussion: The GRAPH.ME file presented below represents the end
product of the definitions made in our sample graph in
this section. (See PCG2 in "Other Programs" for a
description of the GRAPH.ME file.)
░PARMS:L
░TITLE:Comparative Intnl Sales
░TITLES:(By city & Month) TITLEV:Sales in $
░TITLEC:Months
░TITLEG:Cities
░TITLEG:Philly
░TITLEG:Montreal
░TITLEG:Paris
░TITLEG:Moscow
░TITLEG:Redmond
░TITLEG:Lima
░TITLEG:Bonn
░10,20,30,40,100,60,20:Jan
░50,80,20,15,30,110,33:Feb
░22,-10,40,60,15,99,122:Mar
The display below shows how the information would be
placed in the actual line graph. Note that the
location of all the data depends upon the type of
graph being shown.
┌────────────────────────────────────────────────────┐
│ │
│ Comparative Intnl Sales │
│ (By city & Month) │
│ 125 ┤ . │
│ │ Cities │
│ S 100 ┤ . . . .. Philly │
│ a │ . .. Montreal │
│ l 75 ┤ .. Paris │
│ e │ . Data points . .. Moscow │
│ s 50 ┤ . . .. Redmond │
│ │ . . . .. Lima │
│ i 25 ┤ . . .. Bonn │
│ n │ . . . │
│ 0 ┤ │
│ $ │ . │
│ -25 ┴──┬──────────┬──────────┬── │
│ Jan Feb Mar │
│ │
│ Months │
│ │
└────────────────────────────────────────────────────┘
165
bound: In our example, we discussed what happens if the
column labels are numeric and are to be treated as
values. The net result of this case would be the
modification of four lines in the GRAPH.ME file and
the addition of another line as shown.
░TITLEC:Values
░10,20,30,40,100,60,20:#1.
░50,80,20,15,30,110,33:#2.
░22,-10,40,60,15,99,122:#3.4
░BOUND:3.4,1,122,-10,0,358
The TITLEC: line is different because we entered the
column category heading as "Values" instead of
"Months".
Note that "Jan", "Feb" and "Mar" on the three data
lines have been replaced with #1., #2. and #3.4. The
"#" character implies that the data which follows is
to be interpreted by PCG2 as numeric data, not text.
Finally, the "BOUND:" line is added at the end of the
file. Notice that the maximum and minimum values of X
are the first two entries on the line.
The display below shows how this data will change the
line graph from that shown on the previous page.
┌─────────────────────────────────────────────────────┐
│ │
│ Comparative Intnl Sales │
│ (By city & Month) │
│ 125 ┤ . │
│ │ Cities │
│ S 100 ┤ . . . .. Philly │
│ a │ . .. Montreal │
│ l 75 ┤ .. Paris │
│ e │ . Data points . .. Moscow │
│ s 50 ┤ . . .. Redmond │
│ │ . . . .. Lima │
│ i 25 ┤ . . .. Bonn │
│ n │ . . . │
│ 0 ┤ │
│ $ │ . │
│ -25 ┴──┬────────┬────────────┬── │
│ 1.0 2.0 3.4 │
│ │
│ Values │
│ │
└─────────────────────────────────────────────────────┘
166